import _http from '@/utils/http'

export default {
  cards(params, loading) {
    return _http('post', {
      url: '/eas/mobile/index/cards',
      storeName: 'cards',
      apiName: '我的设备'
    }, params, loading)
  },

  cardInfo(params, loading) {
    return _http('post', {
      url: '/eas/mobile/index/cardInfo',
      storeName: 'cardInfo',
      apiName: '我的设备详情'
    }, params, loading)
  },

  packcardInfo(params, loading) {
    return _http('post', {
      url: '/eas/mobile/pack/cardInfo',
      storeName: 'packcardInfo',
      apiName: '获取套餐及使用量'
    }, params, loading)
  },

  bind(params, loading) {
    return _http('post', {
      url: '/eas/mobile/sim/bind',
      apiName: '绑定用户码'
    }, params, loading)
  },

  changeCode(params, loading) {
    return _http('post', {
      url: '/eas/mobile/sim/changeCode',
      apiName: '用户码/IMEI号查询对应绑定的code'
    }, params, loading)
  },

  unbind(params, loading) {
    return _http('post', {
      url: '/eas/mobile/sim/unbind',
      apiName: '解除绑定用户码'
    }, params, loading)
  },

  chargeLog(params, loading) {
    return _http('post', {
      url: '/eas/mobile/pack/chargeLog',
      apiName: '获取订购记录'
    }, params, loading)
  },

  chargeLogDetail(params, loading) {
    return _http('post', {
      url: '/eas/mobile/pack/chargeLogDetail',
      apiName: '获取订购记录详情'
    }, params, loading)
  },

  useDetail(params, loading) {
    return _http('post', {
      url: '/eas/mobile/index/useDetail',
      apiName: '获取流量账单'
    }, params, loading)
  },

  modifyAlias(params, loading) {
    return _http('post', {
      url: '/eas/mobile/index/modifyAlias',
      apiName: '修改设备别名'
    }, params, loading)
  },


  /**
   * 
   * 国际卡相关接口
   */
  cardCorrelation(params, loading) {
    return _http("post", {
      url: "/eas/mobile/ykl/nuna/card/correlation",
      apiName: "根据iccid返对应绑定卡",
      storeName: 'cardCorrelation',
    }, params, loading);
  },

  yklPacks(params, loading) {
    return _http("post", {
      url: "/eas/mobile/ykl/nuna/user/packs",
      apiName: "用户已购套餐 - 按主、副卡返数据",
      storeName: 'yklPacks',
    }, params, loading);
  },

  yklCardOrder(params, loading) {
    return _http("post", {
      url: "/eas/mobile/ykl/nuna/card/order/qry",
      apiName: "订购列表",
    }, params, loading);
  },

  yklCardOrderDetail(params, loading) {
    return _http("post", {
      url: "/eas/mobile/ykl/nuna/card/order/detail",
      apiName: "订购详情",
    }, params, loading);
  },

};
